﻿
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Thêm Lĩnh Vực</title>
</head>

<?php include ("../connect.php"); ?>
<?php
if(isset($_POST['txtten_linh_vuc'])){
	//$ms_linh_vuc=$_POST['txtms_linh_vuc'];
	$ten_linh_vuc=$_POST['txtten_linh_vuc'];
}
?>
<body>
<form name="frmTrolai" method="post" action="../index.php?noidung=tlvtd" >
<input type="hidden" name="txtms_linh_vuc" value="<?php echo $ms_linh_vuc; ?>"/>
<input type="hidden" name="txtten_linh_vuc" value="<?php echo $ten_linh_vuc; ?>"/>
</form>
<?php	
    $sql = "INSERT INTO linh_vuc_td(TEN_LINH_VUC) 
	                    VALUES(N'$ten_linh_vuc')";
    
					
	$rs=mysql_query($sql);
    if($rs)
	{
		echo "<script>
			alert('Thành công...');
		 	location.href='../index.php?noidung=tlvtd';
			</script>";
		exit;
	}
	else 
	{
		echo "<script>
			alert('Chưa lưu được...');
			document.frmTrolai.submit();
			</script>";
	}
?>
</body>
</html>